package entity;

/**
 * @author 胡小超
 * 2024/12/5 上午10:31
 */
public class Employee {
    //属性
    private String name;
    private int age;
    private String position;

    //构造函数
    public Employee() {
    }

    public Employee(String name, int age, String position) {
        this.name = name;
        this.age = age;
        this.position = position;
    }

    //方法
    //自我介绍
    public void introduce() {
        System.out.println("大家好,我是" + name + "，今年" + age + "岁，我的职位是" + position);
    }

    //封装
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getPosition() {
        return position;
    }

    public void setPosition(String position) {
        this.position = position;
    }
}
